package com.woniu.sharepark.leasesystem.common.util;

import com.woniu.sharepark.common.JsonResult;
import com.woniu.sharepark.leasesystem.common.pojo.DrivingPermit;

/**
 * @author DELL
 * @date 2019/6/10 22:57
 * version v1.0
 */
public class VerifyUtil {
    /**
    * 行驶证信息验证
    * @title verifyDriving_permit
    * @param drivingPermit
    * @return com.woniu.sharepark.common.JsonResult
    * @author DELL
    * @date 2019/6/10 23:08
    **/

    public static JsonResult verifyDriving_permit(DrivingPermit drivingPermit){
        if (drivingPermit.getDriveAddress() == null || drivingPermit.getDriveAddress().length() == 0 ||
            drivingPermit.getDriveCharge() == null || drivingPermit.getDriveCharge().length() == 0   ||
            drivingPermit.getDriveCode() == null || drivingPermit.getDriveCode().length() == 0       ||
            drivingPermit.getDriverEngine() == null || drivingPermit.getDriverEngine().length() == 0 ||
            drivingPermit.getDriveRanges() == null || drivingPermit.getDriveRanges().length() == 0   ||
            drivingPermit.getDriverNature() == null || drivingPermit.getDriverNature().length() ==0  ||
            drivingPermit.getDriverPlate() == null || drivingPermit.getDriverPlate().length() == 0   ||
            drivingPermit.getDriverRegistrationtime() == null || drivingPermit.getDriverRegistrationtime().length() == 0){

            return JsonResult.error("不能被识别的图片");
        }
        return JsonResult.ok("success");
    }
}
